﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;

namespace WT.ParkingShare
{
    public class Session
    {
        public Socket ClientSocket { get; set; }//客户端的socket
        public string IP;//客户端的ip

        public Session(Socket clientSocket)
        {
            this.ClientSocket = clientSocket;
            this.IP = GetIPString();
        }

        public string GetIPString()
        {
            string result = ((IPEndPoint)ClientSocket.RemoteEndPoint).Address.ToString();
            return result;
        }
    }
}
